CC       = gcc
RC       = windres
CFLAGS   = -Wall -ggdb
LDFLAGS  = -mwindows -lshlwapi
LIBS     = -lcomctl32 -lole32 
TARGET   = ../comfunct.dll
INCLUDES = -I.
SOURCES  = $(wildcard *.c)
OBJS     = $(patsubst %.c,%.o,$(SOURCES))
		
all: $(TARGET)

$(TARGET) : $(OBJS)	
	$(CC) -shared $(OBJS) -o $(TARGET) $(LDFLAGS) $(LIBS)
	rm -rf $(OBJS)
																				
%.o: %.c
	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@

clean:	
	rm -rf $(OBJS)
	rm -rf $(TARGET)

c: clean

r: clean all
